let admin_server = process.env.VUE_APP_ADMIN_URL
let gin_k8s_server = process.env.VUE_APP_GIN_K8S_URL
let task_server = process.env.VUE_APP_TASK_URL

export const  loginUrl = admin_server + "/admin/auth"+"/login"
// 任务管理
export const get_task_list = task_server + "/task"+"/list";
export const get_log_list = task_server + "/log"+"/list";
export const get_task_log = task_server + "/log" + "/task_log_list";
export const upload_file = task_server + "/file" + "/upload"
export const task_add= task_server + "/task"+"/add";
export const task_update= task_server + "/task"+"/update";
export const task_detail = task_server + "/task" + "/detail";
export const task_start = task_server + "/task" + "/start";
export const task_stop = task_server + "/task" + "/stop";
export const task_run_once = task_server + "/task" + "/run_once"
export const task_delete = task_server + "/task" + "/delete"
export const task_log_delete = task_server + "/task" + "/delete_log"
export const add_task_node = task_server + "/node" + "/add";
export const task_node_list = task_server + "/node" + "/list";
export const task_node_simple_list = task_server + "/node" + "/simpleList";
export const test_node_connect = task_server + "/node" + "/connect";
// 系统配置
export const get_menu_list = admin_server + "/admin/setting"+"/get_menu_list";
export const get_menu_tree = admin_server + "/admin/setting"+"/get_menu_tree";
export const get_menu_name = admin_server + "/admin/setting"+"/get_menu_name";
export const get_new_menu_id = admin_server + "/admin/setting"+"/get_new_menu_id";
export const menu_add = admin_server + "/admin/setting"+"/menu_add";
export const menu_delete = admin_server + "/admin/setting"+"/menu_delete";
export const menu_update = admin_server + "/admin/setting"+"/menu_update";
export const menu_select = admin_server + "/admin/setting"+"/menu_select";
export const get_user_resource = admin_server + "/admin/setting"+"/get_user_resource";

// 用户相关操作
export const user_list = admin_server + "/admin/user"+"/user_list";
export const add_user = admin_server + "/admin/user"+"/add_user";
export const delete_user = admin_server + "/admin/user"+"/delete_user";

export const role_list = admin_server + "/admin/user"+"/role_list";
export const get_role_name = admin_server + "/admin/user"+"/get_role_name";
export const update_role_perm = admin_server + "/admin/user"+"/update_role_perm";
export const get_role_perm = admin_server + "/admin/user"+"/get_role_perm";

// site
export const site_delete = admin_server + "/admin/site"+"/delete";
export const site_add = admin_server + "/admin/site"+"/add";
export const site_update= admin_server + "/admin/site"+"/update";
export const site_list= admin_server + "/admin/site"+"/list";
export const list_by_env= admin_server + "/admin/site"+"/list_by_env";
export const get_site_by_env_name= admin_server + "/admin/site"+"/get_site_by_env_name";
export const site_select = admin_server + "/admin/site"+"/select";

// 压力测试
export const pressure_setting_add = admin_server + "/admin/pressure"+"/setting_add";
export const pressure_setting_list = admin_server + "/admin/pressure"+"/setting_list";
export const pressure_setting_detail = admin_server + "/admin/pressure"+"/setting_detail";
export const pressure_setting_update = admin_server + "/admin/pressure"+"/setting_update";

export const pressure_data_list = admin_server + "/admin/pressure"+"/data_list";
export const get_pressure_name = admin_server + "/admin/pressure"+"/get_pressure_name";
export const pressure_data_detail = admin_server + "/admin/pressure"+"/data_detail";
export const pressure_data_update = admin_server + "/admin/pressure"+"/data_update";

export const pressure_data_add = admin_server + "/admin/pressure"+"/data_add";

// cmdb
export const server_list = admin_server + "/admin/cmdb"+"/server_list";
export const batch_update_server = admin_server + "/admin/cmdb"+"/batch_update_server";

export const batch_push_user = admin_server + "/admin/cmdb"+"/batch_push_user";
export const batch_delete_user = admin_server + "/admin/cmdb"+"/batch_delete_user";

export const server_host_init = admin_server + "/admin/cmdb"+"/server_host_init";
export const update_log_list = admin_server + "/admin/cmdb"+"/update_log_list";
export const init_log_list = admin_server + "/admin/cmdb"+"/init_log_list";

export const record_list = admin_server + "/admin/cmdb"+"/record_list";

export const server_user_list = admin_server + "/admin/cmdb"+"/server_user_list";

export const server_user_info = admin_server + "/admin/cmdb"+"/server_user_info";
// get_server_user只获取名字
export const get_server_user = admin_server + "/admin/cmdb"+"/get_server_user";

export const export_cmdb = admin_server + "/admin/cmdb"+ "/export";

// admin
export const get_cluster_name_list = admin_server + "/admin"+"/get_cluster_name_list";
export const cluster_list = admin_server + "/admin"+"/cluster_list"
export const cluster_enable = admin_server + "/admin"+"/cluster_enable"
export const cluster_disable = admin_server + "/admin"+"/cluster_disable"
export const cluster_create = admin_server + "/admin"+"/cluster_create"
export const get_cluster_by_env = admin_server + "/admin"+"/get_cluster_by_env";



//project
export const get_project_list = admin_server + "/admin/project"+"/get_project_list";
export const get_env_list = admin_server +  "/admin/project"+"/get_env_list" 
export const get_all_service_list = admin_server +  "/admin/project"+"/get_all_service_list" 
export const get_service_detail = admin_server +  "/admin/project"+"/get_service_detail" 

export const get_service_by_project = admin_server +  "/admin/project"+"/get_service_by_project" 
export const get_service_v3 = admin_server +  "/admin/project"+"/get_service_v3" 
export const get_project_leader = admin_server +  "/admin/project"+"/get_project_leader" 
export const get_project_env = admin_server + "/admin/project"+"/get_project_env"
export const get_env_by_project = admin_server + "/admin/project"+"/get_env_by_project";
export const get_project_name_list = admin_server + "/admin/project"+"/get_project_name_list";
export const get_env_name_list = admin_server +  "/admin/project"+"/get_env_name_list" 

// 获取es集群名称列表
export const get_es_name_list = admin_server + "/admin/es"+"/get_es_name_list";
export const get_es_index_list = admin_server + "/admin/es"+"/get_es_index_list";
export const delete_multi_index = admin_server + "/admin/es" + "/delete_multi_index"
export const get_mapping = admin_server + "/admin/es" + "/get_mapping"
export const get_response_stat = admin_server + "/admin/es" + "/get_response_stat"
export const get_api_stat = admin_server + "/admin/es" + "/get_api_stat"

// 过去两天每隔30m的pv量
export const get_request_stat = admin_server + "/admin/es" + "/get_request_stat"
export const get_client_stat = admin_server + "/admin/es" + "/get_client_stat"
export const get_requesttime_stat = admin_server + "/admin/es" + "/get_requesttime_stat"
export const sort_requesttime = admin_server + "/admin/es" + "/sort_requesttime"

//aliyun
export const get_bill_overview = admin_server + "/admin/aliyun" + "/get_bill_overview"
export const get_account_transactions = admin_server + "/admin/aliyun" + "/get_account_transactions"
export const get_region_list = admin_server + "/admin/aliyun" + "/get_region_list"
export const get_server_list = admin_server + "/admin/aliyun" + "/get_server_list"
export const get_cloud_key_pair = admin_server + "/admin/aliyun" + "/get_cloud_key_pair"

//redis 集群
export const get_cluster_nodes = admin_server + "/admin/redis_manage" + "/get_cluster_nodes"
export const get_cluster_info = admin_server + "/admin/redis_manage" + "/get_cluster_info"

//blog
export const blog_delete = admin_server + "/admin/blog"+"/delete";
export const blog_detail = admin_server + "/admin/blog"+"/detail";
export const blog_add = admin_server + "/admin/blog"+"/add";
export const blog_update= admin_server + "/admin/blog"+"/update";

export const blog_update_view = admin_server + "/admin/blog"+"/update_view";
export const blog_list= admin_server + "/admin/blog"+"/v2/list";


//bucket
export const create_bucket = admin_server +  "/admin/bucket"+"/create_bucket" 
export const delete_bucket = admin_server +  "/admin/bucket"+"/delete_bucket" 
export const get_all_buckets = admin_server +  "/admin/bucket"+"/get_all_buckets" 
export const bucket_key_list = admin_server +  "/admin/bucket"+"/bucket_key_list" 
export const delete_key = admin_server +  "/admin/bucket"+"/delete_key" 
// export const put_object = admin_server +  "/admin/bucket"+"/put_object" 
export const put_object = admin_server +  "/admin/file"+"/put_object" 



// istio
export const get_virtual_service_list = admin_server + "/admin/istio" + "/get_virtual_service_list"
export const delete_vs = admin_server + "/admin/istio" + "/delete_vs"
export const update_vs = admin_server + "/admin/istio" + "/update_vs"
export const get_gateway_list = admin_server + "/admin/istio" + "/get_gateway_list"
export const get_destination_rule_list = admin_server + "/admin/istio" + "/get_destination_rule_list"
export const delete_dr = admin_server + "/admin/istio" + "/delete_dr"
export const update_breaker = admin_server + "/admin/istio" + "/update_breaker"
export const delete_breaker = admin_server + "/admin/istio" + "/delete_breaker"
export const update_loadBalancer = admin_server + "/admin/istio" + "/update_loadBalancer"
export const delete_loadBalancer = admin_server + "/admin/istio" + "/delete_loadBalancer"
// 更新dr版本
export const update_versions = admin_server + "/admin/istio" + "/update_versions"
// 更新vs超时
export const update_timeout = admin_server + "/admin/istio" + "/update_timeout"

export const get_custom_object = admin_server + "/admin/istio" + "/get_custom_object"
export const update_custom_object = admin_server + "/admin/istio" + "/update_custom_object"

// auth 
export const get_service_account_list =  gin_k8s_server + "/k8s"+"/get_service_account_list";
export const delete_service_account = gin_k8s_server + "/k8s" + "/delete_service_account"


// workload
export const get_statefulset_list = gin_k8s_server + "/k8s" + "/get_statefulset_list"
export const get_statefulset_detail = gin_k8s_server + "/k8s" + "/get_statefulset_detail"
export const get_daemonset_list = gin_k8s_server + "/k8s" + "/get_daemonset_list"
export const delete_statefulset = gin_k8s_server + "/k8s" + "/delete_statefulset"
export const delete_daemonset = gin_k8s_server + "/k8s" + "/delete_daemonset"

// deployment
export const get_deployment_object =gin_k8s_server +  "/k8s"+"/get_deployment_object" 
export const update_deployment_object = gin_k8s_server + "/k8s" + "/update_deployment_object"
export const get_deployment_list = gin_k8s_server + "/k8s" + "/get_deployment_list"
export const get_problem_deployments = gin_k8s_server + "/k8s" + "/get_problem_deployments"
export const get_deployment_detail = gin_k8s_server + "/k8s" + "/get_deployment_detail"
export const get_deployment_replicas = gin_k8s_server + "/k8s" + "/get_deployment_replicas"
export const delete_deploy = gin_k8s_server +  "/k8s"+"/delete_deploy" 
export const update_replicas = gin_k8s_server + "/k8s" + "/update_replicas"
export const delete_node_affinity = gin_k8s_server + "/k8s" + "/delete_node_affinity"
export const add_node_affinity = gin_k8s_server + "/k8s" + "/add_node_affinity"
export const add_pod_anti_affinity = gin_k8s_server + "/k8s" + "/add_pod_anti_affinity"
export const delete_pod_anti_affinity = gin_k8s_server + "/k8s" + "/delete_pod_anti_affinity"
export const add_toleration = gin_k8s_server + "/k8s" + "/add_toleration"
export const delete_toleration = gin_k8s_server + "/k8s" + "/delete_toleration"

//pod
export const get_pod_log = gin_k8s_server +  "/k8s"+"/get_pod_log" 
export const get_pod_detail = gin_k8s_server + "/k8s" + "/get_pod_detail"
export const get_node_name_list = gin_k8s_server + "/k8s" + "/get_node_name_list"
export const get_namespaced_pod_list = gin_k8s_server + "/k8s" + "/get_namespaced_pod_list"
export const get_problem_pod_list = gin_k8s_server + "/k8s" + "/get_problem_pod_list"
export const delete_pod = gin_k8s_server + "/k8s" + "/delete_pod"
export const get_pod_list_by_node = gin_k8s_server + "/k8s" + "/get_pod_list_by_node"
export const get_container_name = gin_k8s_server + "/k8s" + "/get_container_name"

// hpa
export const update_hpa_replicas = gin_k8s_server +  "/k8s"+"/update_hpa_replicas"
export const delete_hpa = gin_k8s_server + "/k8s" + "/delete_hpa"
export const get_hpa_list = gin_k8s_server + "/k8s" + "/get_hpa_list"

// storage
export const delete_pvc = gin_k8s_server +  "/k8s"+"/delete_pvc"
export const create_pv = gin_k8s_server + "/k8s" + "/create_pv"
export const delete_multi_pv = gin_k8s_server + "/k8s" + "/delete_multi_pv"
export const delete_pv = gin_k8s_server + "/k8s" + "/delete_pv"


export const get_storageclass_list = gin_k8s_server + "/k8s" + "/get_storageclass_list"
export const get_pv_list = gin_k8s_server + "/k8s" + "/get_pv_list"
export const select_pv = gin_k8s_server + "/k8s" + "/select_pv"
export const select_pvc = gin_k8s_server + "/k8s" + "/select_pvc"
export const get_pvc_list = gin_k8s_server + "/k8s" + "/get_pvc_list"

// service
export const delete_ingress = gin_k8s_server +  "/k8s"+"/delete_ingress"
export const delete_service = gin_k8s_server +  "/k8s"+"/delete_service"
export const get_service_list = gin_k8s_server + "/k8s" + "/get_service_list"
export const get_ingress_list = gin_k8s_server + "/k8s" + "/get_ingress_list"

// cluster

export const get_cluster_stats  = gin_k8s_server + "/k8s"+"/get_cluster_stats"
export const get_all_namespace_resources = gin_k8s_server +  "/k8s"+"/get_all_namespace_resources" 
export const get_event_list = gin_k8s_server + "/k8s" + "/get_event_list"
export const get_node_stat = gin_k8s_server+ "/k8s"+"/get_node_stat"
export const create_namespace = gin_k8s_server + "/k8s" + "/create_namespace";
export const get_namespace_name_list = gin_k8s_server + "/k8s" + "/get_namespace_name_list";
export const get_namespace_list = gin_k8s_server + "/k8s" + "/get_namespace_list"
export const delete_namespace = gin_k8s_server + "/k8s" + "/delete_namespace"
export const update_namespace = gin_k8s_server + "/k8s" + "/update_namespace"
export const get_node_list = gin_k8s_server + "/k8s" + "/get_node_list"
export const update_node = gin_k8s_server + "/k8s" + "/update_node"
//config
export const get_configmap_list = gin_k8s_server + "/k8s" + "/get_configmap_list"
export const get_cm_detail = gin_k8s_server + "/k8s" + "/get_cm_detail"
export const get_secret_list = gin_k8s_server + "/k8s" + "/get_secret_list"
export const get_secret_detail = gin_k8s_server + "/k8s" + "/get_secret_detail"
export const delete_configmap = gin_k8s_server + "/k8s" + "/delete_configmap"
export const delete_secret = gin_k8s_server + "/k8s" + "/delete_secret"



// release
export const release_add =    admin_server + "/flow/release"+"/release_add";
export const release_list =   admin_server + "/flow/release"+"/release_list";
export const release_delete = admin_server + "/flow/release"+"/release_delete";
export const release_update = admin_server + "/flow/release"+"/release_update";
export const release_update_status = admin_server + "/flow/release"+"/release_update_status";
export const release_select = admin_server + "/flow/release"+"/release_select";
export const release_review = admin_server + "/flow/release"+"/release_review";
export const release_detail = admin_server + "/flow/release"+"/release_detail";

// 
export const bug_add = admin_server + "/flow/bug"+"/bug_add";
export const bug_list = admin_server + "/flow/bug"+"/bug_list";
export const bug_update = admin_server + "/flow/bug"+"/bug_update";
export const not_finished_bug = admin_server + "/flow/bug" + "/not_finished_bug";

// 
export const requirement_add = admin_server + "/flow/requirement"+"/requirement_add";
export const requirement_list = admin_server + "/flow/requirement"+"/requirement_list";
export const requirement_update = admin_server + "/flow/requirement"+"/requirement_update";
export const not_finished_requirement = admin_server + "/flow/requirement"+"/not_finished_requirement";

// 
export const version_add = admin_server + "/flow/version"+"/version_add";
export const version_list = admin_server + "/flow/version"+"/version_list";
export const version_update = admin_server + "/flow/version"+"/version_update";
export const version_select= admin_server + "/flow/version"+"/version_select";






export const build_service  =  admin_server +  "/flow/releaseTask"+"/build_service"
export const job_log  =  admin_server +  "/flow/releaseTask"+"/job_log"
export const get_service_task = admin_server +  "/flow/releaseTask"+"/get_service_task"

//harbor
export const get_tags_v2 = admin_server +  "/flow/harbor"+"/get_tags_v2" 

//public
export const public_list = admin_server +  "/flow/public"+"/public_list"
export const public_detail_list = admin_server +  "/flow/public"+"/public_detail_list"
export const public_log_list = admin_server +  "/flow/public"+"/public_log_list"
export const update_release_v2  =  admin_server +  "/flow/public"+"/update_release_v2"
export const update_gray_release =  admin_server +  "/flow/public"+"/update_gray_release"
export const offline_release_v2 =  admin_server +  "/flow/public"+"/offline_release_v2"
export const create_release_v2 = admin_server +  "/flow/public"+"/create_release_v2"








